package com.wl4837;

public class App
{
    public static void main( String[] args )
    {
        ComputerPart computer = new Computer();
        ComputerPartVisitor displayVisitor = new ComputerPartDisplayVisitor();
        ComputerPartVisitor checkVisitor = new ComputerPartCheckVisitor();

        System.out.println("=== 显示计算机部件 ===");
        computer.accept(displayVisitor);

        System.out.println("\n=== 检查计算机部件 ===");
        computer.accept(checkVisitor);
    }
}
